package Test_0814.user;

import Test_0814.ioperations.*;

import java.util.Scanner;

/**
 * Created with Intellij IDEA
 * Description:
 * User: 星辰
 * Dare: 2024-08-14
 * Time: 19:06
 */
/*普通用户：
权限：1.查找图书
     2.借阅图书
     3.归还图书
     4.退出系统*/
public class NormalUser extends User{
    public NormalUser(String name) {
        super(name);
        this.ioPeration=new IoPeration[]{
                new ExitOperation(),
                new FindOperation(),
                new BorrowOperation(),
                new ReturnOperation()
        };
    }
    //普通用户菜单
    public int menu(){
        System.out.println("*******普通用户*******");
        System.out.println("******1.查找图书******");
        System.out.println("******2.借阅图书******");
        System.out.println("******3.归还图书******");
        System.out.println("******0.退出系统******");
        Scanner scanner =new Scanner(System.in);
        System.out.println("******请选择选项******");
        int choice = scanner.nextInt();//读入整数
        return choice;
    }
}
